Skip to main content
GET
/
hub
/
route-templates
[beta] List route templates for a specific hub
curl --request GET \
  --url https://api.samsara.com/hub/route-templates \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "createdAtTime": "2024-01-15T10:30:00Z",
      "distanceMeters": 15000,
      "durationSeconds": 3600,
      "hubId": "550e8400-e29b-41d4-a716-446655440000",
      "hubTimezone": "America/Los_Angeles",
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "locations": [
        {
          "formattedAddress": "456 Main St, Los Angeles, CA 90210, US",
          "id": "850e8400-e29b-41d4-a716-446655440003",
          "latitude": 34.0522,
          "longitude": -118.2437,
          "name": "Customer ABC Warehouse",
          "position": 1,
          "externalId": "LOC-123"
        }
      ],
      "name": "Downtown Delivery Route",
      "updatedAtTime": "2024-01-15T12:00:00Z",
      "defaultDepotEnd": {
        "formattedAddress": "123 Industrial Blvd, Los Angeles, CA 90210, US",
        "id": "750e8400-e29b-41d4-a716-446655440002",
        "latitude": 34.0522,
        "longitude": -118.2437,
        "name": "Main Warehouse",
        "externalId": "DEPOT-001"
      },
      "defaultDepotStart": {
        "formattedAddress": "123 Industrial Blvd, Los Angeles, CA 90210, US",
        "id": "750e8400-e29b-41d4-a716-446655440002",
        "latitude": 34.0522,
        "longitude": -118.2437,
        "name": "Main Warehouse",
        "externalId": "DEPOT-001"
      },
      "earliestStartTime": "08:00"
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

hubId
string
required

The hub identifier.

id
string

Filter by a specific route template ID.

name
string

Filter by route template name (exact match).

after
string

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

limit
integer
default:100

The limit for how many objects will be in the response. Default and max for this value is 100 objects.

Required range: 1 <= x <= 100

Response

OK response.

data
object[]
required

Route templates.

pagination
object
required

Pagination parameters.